//package top.xierongsheng.user.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import lombok.RequiredArgsConstructor;
//import org.springframework.web.bind.annotation.*;
//import top.xierongsheng.code.R;
//import top.xierongsheng.user.model.SYS_LOG;
//import top.xierongsheng.user.service.ILogService;
//
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//@RestController //这意味着这个类是一个控制器
//@RequestMapping(path = "/sysLog") //这意味着URL以/sysLog开头（在应用程序路径之后）
//@RequiredArgsConstructor
//@CrossOrigin
//@Tag(name = "日志接口")
//public class LogController {
//
//    private final ILogService logService;
//
//    @GetMapping(path = "getLogListPage")
//    @Operation(summary = "分页查询获取日志列表")
//    public R getLogListPage(@RequestHeader(name = "userId") String userId, @RequestParam(defaultValue = "1") Integer pageNo, @RequestParam(defaultValue = "10") Integer pageSize) {
//        IPage page = logService.page(new Page<>(pageNo, pageSize), new QueryWrapper<SYS_LOG>().lambda().orderByDesc(SYS_LOG::getOperationTime));
//        List<SYS_LOG> sysLogList = page.getRecords();
//        Map baseReturn = new HashMap();
//        baseReturn.put("pageNo", page.getCurrent());
//        baseReturn.put("pageSize", page.getSize());
//        baseReturn.put("total", page.getTotal());
//        baseReturn.put("list", sysLogList);
//        return R.ok().zip("data", baseReturn);
//    }
//}
